package ru.elteam.logic;

/**
 * @author Nikita.Brazhnikov
 */
public class ProjectDescriptor {

	private Long id;
	private String name;

	public ProjectDescriptor(Long id, String name) {
		this.id = id;
		this.name = name;
	}

	public Long getId() {
		return id;
	}

	public String getName() {
		return name;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) return true;
		if (!(o instanceof ProjectDescriptor)) return false;

		ProjectDescriptor that = (ProjectDescriptor) o;

		if (id != null ? !id.equals(that.id) : that.id != null) return false;

		return true;
	}

	@Override
	public int hashCode() {
		return id != null ? id.hashCode() : 0;
	}

	@Override
	public String toString() {
		return "ProjectDescriptor{" +
			 "id=" + id +
			 ", name='" + name + '\'' +
			 '}';
	}
}
